<div xmlns="http://www.w3.org/1999/xhtml"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     class="padding1">

    <script type="text/javascript" charset="utf-8">
        $(document).ready(function () {
            $('#dictionaries').dataTable({
                "sScrollX":"100%",
                "sScrollXInner":"100%",
                "bScrollCollapse":true,
                "bJQueryUI":true,
                "sPaginationType":"full_numbers",
                "bProcessing":true,
                "bServerSide":true,
                "sAjaxSource":"dictionariesTable.jsp",
                "oLanguage":{
                    "sLengthMenu":"#{msgs['sLengthMenu']}",
                    "sZeroRecords":"#{msgs['sZeroRecords']}",
                    "sEmptyTable":"#{msgs['sEmptyTable']}",
                    "sInfo":"#{msgs['sInfo']}",
                    "sInfoEmpty":"#{msgs['sInfoEmpty']}",
                    "sInfoFiltered":"#{msgs['sInfoFiltered']}",
                    "sProcessing":"#{msgs['sProcessing']}",
                    "sLoadingRecords":"#{msgs['sLoadingRecords']}",
                    "sSearch":"#{msgs['sSearch']}",
                    "oPaginate":{
                        "sFirst":"#{msgs['oPaginate.sFirst']}",
                        "sLast":"#{msgs['oPaginate.sLast']}",
                        "sNext":"#{msgs['oPaginate.sNext']}",
                        "sPrevious":"#{msgs['oPaginate.sPrevious']}"
                    }
                },
                "aoColumnDefs":[
                    {   "bSortable":false,
                        "sWidth":"20px",
                        "fnRender":function (oObj) {
                            return '&lt;div align="center"&gt;&lt;input type="radio" onclick="checkDictionarySelected()" name="dictId" value="' + oObj.aData[0] + '"/&gt;&lt;/div&gt;';
                        },
                        "aTargets":[0]
                    } ,
                    { "sTitle":"#{msgs['dictionary.parent']}", "aTargets":[1] },
                    { "sTitle":"#{msgs['dictionary.code']}", "aTargets":[2] },
                    { "sTitle":"#{msgs['dictionary.description']}", "aTargets":[3] }
                ]
            });
        });
    </script>

    <h:outputText value="Словари системы" styleClass="table-header"/>

    <div class="tablectrl">
        <input type="button" title="#{msgs['add']}" value="#{msgs['add']}" class="margin2ptb"
               onclick="addDialogOpen()"/>
        <input type="button" title="#{msgs['edit']}" value="#{msgs['edit']}" class="margin2ptb"
               onclick="editDialogOpen()" name="editRoleBtn"/>
        <input type="button" title="#{msgs['delete']}" value="#{msgs['delete']}" class="margin2ptb"
               onclick="return false" name="deleteRoleBtn"/>
        <table cellpadding="0" cellspacing="0" border="0" class="display" id="dictionaries"></table>
        <input type="button" title="#{msgs['add']}" value="#{msgs['add']}" class="margin2ptb"
               onclick="addDialogOpen()"/>
        <input type="button" title="#{msgs['edit']}" value="#{msgs['edit']}" class="margin2ptb"
               onclick="editDialogOpen()" name="editRoleBtn"/>
        <input type="button" title="#{msgs['delete']}" value="#{msgs['delete']}" class="margin2ptb"
               onclick="return false" name="deleteRoleBtn"/>
    </div>
    <!--Добавление-->
    <!--<div id="addRoleDialog" title="Добавление роли">-->
        <!--<ui:include src="/admin/editRole.xhtml">-->
            <!--<ui:param name="method" value="add"/>-->
        <!--</ui:include>-->
    <!--</div>-->
    <!--Редактирование-->
    <!--<div id="editRoleDialog" title="Редактирование роли">-->
        <!--<ui:include src="/admin/editRole.xhtml">-->
            <!--<ui:param name="method" value="edit"/>-->
        <!--</ui:include>-->
    <!--</div>-->
</div>